<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>PushMapPosition</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">PushMapPosition()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>PushMapPosition</b></font>(Map())</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Remembers the current element (if any) of the map so it can later be restored using <a href="popmapposition.html">PopMapPosition()</a>. The position 
is remembered on a stack structure, so multiple calls to this function are possible. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Map()</i></td>
<td width="90%"> 
 
The map to use. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

None.





</blockquote><p><b>Remarks</b></p><blockquote>



This function can be used to remember the current element, so an iteration can be made over the map 
using <a href="nextmapelement.html">NextMapElement()</a> or <a href="../reference/foreach_next.html">ForEach</a> and the current element can be restored 
after the iteration using <a href="popmapposition.html">PopMapPosition()</a>. Multiple calls can be made to this function, as long as 
each is balanced with a corresponding <a href="popmapposition.html">PopMapPosition()</a> call later. 
<br>
<br>
Note: It is not allowed to delete an element that is a remembered current element using the <a href="deletemapelement.html">DeleteMapElement()</a> or 
<a href="clearmap.html">ClearMap()</a> function. This may result in a crash when <a href="popmapposition.html">PopMapPosition()</a> is called because the elements memory 
is no longer valid. 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">NewMap</font></b> <font color="#006666">Numbers</font>()
<font color="#006666">  Numbers</font>("A") = 1
<font color="#006666">  Numbers</font>("B") = 2
<font color="#006666">  Numbers</font>("C") = 5
<font color="#006666">  Numbers</font>("D") = 3
<font color="#006666">  Numbers</font>("E") = 2
<font color="#006666">  Numbers</font>("F") = 5
  
  <font color="#006666">; A simple duplicate elimination using a nested iteration</font>
  <font color="#006666">;</font>
  <b><font color="#006666">ForEach</font></b> <font color="#006666">Numbers</font>()
    Value =<font color="#006666"> Numbers</font>()
<font color="#006666">    PushMapPosition</font>(<font color="#006666">Numbers</font>())
    <b><font color="#006666">While</font></b> <font color="#006666">NextMapElement</font>(<font color="#006666">Numbers</font>())
      <b><font color="#006666">If</font></b> <font color="#006666">Numbers</font>() = Value 
<font color="#006666">        DeleteMapElement</font>(<font color="#006666">Numbers</font>())
      <b><font color="#006666">EndIf</font></b>
    <b><font color="#006666">Wend</font></b>
<font color="#006666">    PopMapPosition</font>(<font color="#006666">Numbers</font>())
  <b><font color="#006666">Next</font></b>
  
  <b><font color="#006666">ForEach</font></b> <font color="#006666">Numbers</font>()
    <b><font color="#006666">Debug</font></b> <font color="#006666">Numbers</font>()
  <b><font color="#006666">Next</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="popmapposition.html">PopMapPosition()</a>, <a href="findmapelement.html">FindMapElement()</a>, <a href="nextmapelement.html">NextMapElement()</a>, <a href="resetmap.html">ResetMap()</a>, 
<a href="../reference/foreach_next.html">ForEach</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=popmapposition.html>PopMapPosition()</a> - <a href=index.html>Map Index</a> - <a href=resetmap.html>ResetMap()</a> -&gt;



</body></html>